﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AltimilliaLibrary.Base_Object;

namespace AltimilliaLibrary.ScreenManagement
{
    public class ScreenManager : BaseManager
    {
        public Engine engine { get; set; }

        public ScreenManager(Engine engine)
        {
            this.engine = engine;
        }

        protected override void UpdateItem(Microsoft.Xna.Framework.GameTime gameTime, IAltimilliaGameComponent gc)
        {
            GameScreen screen = (GameScreen)gc;
            if (screen.ScreenState != GameScreen.GameScreenState.UnActive && screen.ScreenState != GameScreen.GameScreenState.Frozen)
            {
                base.UpdateItem(gameTime, gc);
            }
        }
        public override void DrawItem(Microsoft.Xna.Framework.GameTime gameTime, IAltimilliaGameComponent gc)
        {
            GameScreen screen = (GameScreen)gc;
            if (screen.ScreenState == GameScreen.GameScreenState.Active)
            {
                base.DrawItem(gameTime, gc);
            }
        }
    }
}
